package com.xiaozhengkeji.blogsuper.api;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.xiaozhengkeji.blogsuper.base.service.ArticleClassEntityService;
import com.xiaozhengkeji.blogsuper.base.service.ArticleDiscussEntityService;
import com.xiaozhengkeji.blogsuper.base.service.SystemConfigEntityService;
import com.xiaozhengkeji.blogsuper.base.service.UserEntityService;
import com.xiaozhengkeji.blogsuper.bean.ResponseBean;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 文章评论Api
 */
@Slf4j
@RestController
@RequestMapping("/web/Article/Discuss")
public class ArticleDiscussApi {
    @Autowired
    UserEntityService userEntityService;
    @Autowired
    ArticleClassEntityService articleClassEntityService;
    @Autowired
    SystemConfigEntityService systemConfigEntityService;
    @Autowired
    ArticleDiscussEntityService articleDiscussEntityService;


    /**
     * 评论一个文章
     */
    @ApiOperation("评论一个文章 (需要登录)")
    @PostMapping("createArticleDiscuss")
    @SaCheckLogin
    public ResponseBean createArticleDiscuss(@ApiParam("所属文章") @RequestParam("articleAdsID") Integer articleAdsID,
                                             @ApiParam("评论内容") @RequestParam("comments") String comments) {
        return null;
    }

    /**
     * 对一个评论进行回复
     */
    @ApiOperation("对一个评论进行回复 (需要登录)")
    @PostMapping("replyArticleDiscuss")
    @SaCheckLogin
    public ResponseBean replyArticleDiscuss(@ApiParam("所属评论") @RequestParam("articleAdsID") Integer ArticleDiscusID,
                                            @ApiParam("评论内容") @RequestParam("comments") String comments) {
        return null;
    }

    /**
     * 获取一个文章下的全部评论
     */
    @ApiOperation("获取一个文章下的全部评论")
    @GetMapping("getArticleDiscuss")
    public ResponseBean getArticleDiscuss(@ApiParam("所属文章") @RequestParam("articleAdsID") Integer articleAdsID) {
        return null;
    }

    /**
     * 获取一个评论下的回复
     */
    @ApiOperation("获取一个文章评论下的全部回复")
    @GetMapping("getArticleDiscussReply")
    public ResponseBean getArticleDiscussReply(@ApiParam("所属评论") @RequestParam("articleAdsID") Integer ArticleDiscusID) {
        return null;
    }
}
